<template>
  <div class="NavsLoast-wrap">
  <van-swipe :autoplay="3000" class="container">
      <van-swipe-item v-for="(image, index) in imgs" :key="index" class='item'>
        <img :src="image.src" />
      </van-swipe-item>
    </van-swipe>


  </div>
</template>

<script>
import request from '@/request/request.js'
export default {
  name: 'swiper',
   props:['url'],
  data(){
       return{
            imgs:[]
       }
  },
   created() {
      // console.log(this.$props)
      var res = request({
        methods:"get",
        url:this.$props.url
      }).then((res)=>{
        // console.log(res.data)
        this.imgs=res.data
        // console.log(this.imgs)
      })
      // console.log(res.data)
    }
}
</script>
<style  scoped>
 .container{
    width: 100%;
    height: 180px;
  }
  .container .item{
    width: 100%;
    height: 100%;
  }
  .container .item img{
    width: 100%;
    height: 100%;
  }
</style>
